import requests
from proxy.Manager.ProxyManager import ProxyManager

def test():
    url = "http://www.iwencai.com/data-robot/extract-new?query=%E6%B6%A8%E5%B9%85%E9%9D%A0%E5%89%8D%E7%9A%84A%E8%82%A1%EF%BC%8C%E5%8E%BB%E6%8E%89%E6%96%B0%E8%82%A1%EF%BC%8C%E9%BE%99%E8%99%8E%E6%A6%9C&firstDraw=1"
    proxy = ProxyManager().get()
    headers = {
        "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36"
    }
    cookies = {

    }
    proxies = {"http": "http://{proxy}".format(proxy=proxy)}
    page = requests.get(url, proxies=proxies)
    data = page.content.decode("utf-8")
    print(data)


if __name__=="__main__":
    test()